package lambda;

import lambda.lambda.lam;
import lambda.lambda.lam02;

import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.List;

public class lambdaDemo02 {


    public static void main(String[] args) {
        List<Person> list = new ArrayList<>();
        list.add(new Person("李荣浩",18));
        list.add(new Person("汪苏泷",18));
        //有参数有返回值类型
        select(name->{
            System.out.println(name);
            return 18;
        });
    }
   public static int select( lam02 lam02){
        return lam02.showAge("汪苏泷");
   }

}
